package com.oauthorization.server.contants;

import java.time.Duration;

/**
 * Redis相关常量
 */
public class RedisConstants {

    /**
     * jwk set缓存前缀
     */
    public static final String AUTHORIZATION_JWS_PREFIX_KEY = "PASSPORT:authorization_jws";

    /**
     * 认证信息存储前缀
     */
    public static final String SECURITY_CONTEXT_PREFIX_KEY = "PASSPORT:security_context:";
    /**
     * 角色信息存储前缀
     */
    public static final String ROLE_INFO_PREFIX_KEY = "PASSPORT:role:";

    /**
     * 短信验证码前缀
     */
    public static final String SMS_CAPTCHA_PREFIX_KEY = "PASSPORT:sms_captcha:";

    /**
     * 图形验证码前缀
     */
    public static final String IMAGE_CAPTCHA_PREFIX_KEY = "PASSPORT:image_captcha:";

    /**
     * 默认过期时间，默认五分钟
     */
    public static final Duration DEFAULT_TIMEOUT_SECONDS = Duration.ofMinutes(180);

}
